# $Id: PKGBUILD 82563 2013-01-21 00:12:49Z dwallace $
# Maintainer: Daniel Wallace <danielwallace at gtmanfred dot com>
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: ML <neldoreth>

pkgname=zathura
pkgver=0.2.2
pkgrel=1
pkgdesc="a document viewer"
arch=('i686' 'x86_64')
url="http://pwmt.org/projects/zathura/"
license=('custom')
depends=('girara-gtk2' 'sqlite' 'desktop-file-utils')
makedepends=('python2-docutils')
optdepends=('zathura-djvu' 'zathura-pdf-poppler' 'zathura-ps')
install=zathura.install
source=(http://pwmt.org/projects/zathura/download/zathura-$pkgver.tar.gz
	    bash-completion)
md5sums=('51558163e942b52036ee00c60bd1500c'
         'cac20c37f0e77ba62a8138788f4ccabb')

build() {
  cd $srcdir/zathura-$pkgver
  sed -i 's/rst2man/&2/' config.mk
  make ZATHURA_GTK_VERSION=2
}

package() {
  cd $srcdir/zathura-$pkgver
  make install DESTDIR=$pkgdir ZATHURA_GTK_VERSION=2
  install -D -m664 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
  install -Dm0644 $srcdir/bash-completion $pkgdir/usr/share/bash-completion/completions/zathura
}
